package org.example.managere.entity.feibiao;

import jakarta.persistence.*;
import lombok.Data;
import java.util.Date;

/**
 * 知识图谱实体关系网络表 Entity
 */
@Entity
@Table(name = "am_knowledge_relation")
@Data
public class AmKnowledgeRelation {
    @Id
    @Column(name = "relationship_id", length = 10, nullable = false)
    private String relationshipId; // 关系唯一标识

    @Column(name = "entity_id1", length = 10, nullable = false)
    private String entityId1; // 起始实体ID

    @Column(name = "entity_id2", length = 10, nullable = false)
    private String entityId2; // 目标实体ID

    @Column(name = "relationship_type", length = 50, nullable = false)
    private String relationshipType; // 关系类型

    @Column(name = "relationship_description", columnDefinition = "TEXT", nullable = false)
    private String relationshipDescription; // 关系语义说明

    @Column(name = "relation_update_time", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date relationUpdateTime; // 最后更新时间
} 